import{_ as V}from"./ResourceCodeBlock.vue_vue_type_style_index_0_lang-2yNFGPOQ.js";import{d as $,a as l,o as t,b as n,w as o,E as g,A as f,t as w,m as y,f as m,e as r,a2 as F,F as b,c as p,H as B,p as S}from"./index-c80Lh_is.js";import"./CodeBlock-BSWXsm4g.js";import"./toYaml-sPaYOD3i.js";const L={key:2,class:"stack"},I={class:"mt-4"},K={key:3,"data-testid":"affected-data-plane-proxies"},P=$({__name:"BuiltinGatewayDetailView",setup(M){return(N,q)=>{const k=l("KInput"),C=l("RouterLink"),_=l("DataSource"),x=l("KCard"),v=l("AppView"),E=l("RouteView");return t(),n(E,{name:"builtin-gateway-detail-view",params:{mesh:"",gateway:"",codeSearch:"",codeFilter:!1,codeRegExp:!1,dataplane:""}},{default:o(({route:a,t:u})=>[r(v,null,{default:o(()=>[r(_,{src:`/meshes/${a.params.mesh}/mesh-gateways/${a.params.gateway}`},{default:o(({data:d,error:h})=>[h?(t(),n(g,{key:0,error:h},null,8,["error"])):d===void 0?(t(),n(f,{key:1})):(t(),p("div",L,[r(x,null,{default:o(()=>[y("h2",null,w(u("builtin-gateways.detail.affected_dpps")),1),m(),y("div",I,[r(k,{"model-value":a.params.dataplane,type:"text",placeholder:u("builtin-gateways.detail.dataplane_input_placeholder"),required:"","data-testid":"dataplane-search-input",onInput:e=>a.update({dataplane:e})},null,8,["model-value","placeholder","onInput"]),m(),r(_,{src:`/meshes/${a.params.mesh}/mesh-gateways/${a.params.gateway}/dataplanes`},{default:o(({data:e,error:c})=>[c?(t(),n(g,{key:0,error:c},null,8,["error"])):e===void 0?(t(),n(f,{key:1})):e.items.length===0?(t(),n(F,{key:2})):(t(),p("ul",K,[(t(!0),p(b,null,B(e.items.filter(s=>s.name.toLowerCase().includes(a.params.dataplane.toLowerCase())),(s,i)=>(t(),p("li",{key:i,"data-testid":"dataplane-name"},[r(C,{to:{name:"data-plane-detail-view",params:{mesh:s.mesh,dataPlane:s.name}}},{default:o(()=>[m(w(s.name),1)]),_:2},1032,["to"])]))),128))]))]),_:2},1032,["src"])])]),_:2},1024),m(),r(V,{resource:d.config,"is-searchable":"",query:a.params.codeSearch,"is-filter-mode":a.params.codeFilter,"is-reg-exp-mode":a.params.codeRegExp,onQueryChange:e=>a.update({codeSearch:e}),onFilterModeChange:e=>a.update({codeFilter:e}),onRegExpModeChange:e=>a.update({codeRegExp:e})},{default:o(({copy:e,copying:c})=>[c?(t(),n(_,{key:0,src:`/meshes/${d.mesh}/mesh-gateways/${d.name}/as/kubernetes?no-store`,onChange:s=>{e(i=>i(s))},onError:s=>{e((i,R)=>R(s))}},null,8,["src","onChange","onError"])):S("",!0)]),_:2},1032,["resource","query","is-filter-mode","is-reg-exp-mode","onQueryChange","onFilterModeChange","onRegExpModeChange"])]))]),_:2},1032,["src"])]),_:2},1024)]),_:1})}}});export{P as default};
